package com.jzr.board.ui.adapter

import android.view.View
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.jzr.board.R
import com.jzr.board.bean.FeeDataBean
import com.jzr.board.bean.FeeRecordListBean


class FeeChildrenApadter(data: MutableList<FeeRecordListBean.DataBean>?) :
    BaseQuickAdapter<FeeRecordListBean.DataBean, BaseViewHolder>(
        R.layout.item_fee_children,
        data
    ) {


    override fun convert(helper: BaseViewHolder?, item: FeeRecordListBean.DataBean?) {


        if (helper?.layoutPosition!! % 2 == 0) {
            helper.getView<View>(R.id.item_doctor_advice)
                .setBackgroundColor(mContext.resources.getColor(R.color.white))
        }
        helper.setText(R.id.tvNumber, helper.layoutPosition.toString())
        helper.setText(R.id.tvFeeName,item?.feeName)
        helper.setText(R.id.tvTotalAmount,item?.totalAmount.toString())
        helper.setText(R.id.tvUnitPrice,item?.unitPrice.toString())
        item?.billQty?.let { helper.setText(R.id.tvBillQty, it.toString()) }

    }


}

